Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pasting logic for spans in email editor #2492

Merged
merged 2 commits into from
Jan 24, 2025

Conversation

ziggabyte
Copy link
Contributor

Description

This PR solves the bug where formatted text pasted into the email editor would be turned into inline variables.

Screenshots

copied
bild

pasted
bild

Changes

  • Changes the paragraph tool we use to have a paste function that handles span-tags

Notes to reviewer

paste some stuff! preferrably on iOS! bc I have Windows and who knows what weirdness Windows does when copying things!

Related issues

Resolves #2394

Copy link
Member

@richardolsson richardolsson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tried the preview build and reviewed the code changes, and they look good to me! This takes away a fair amount of pressure from the development timeline of the new editor. Look forward to releasing and sharing this with users today!


static get pasteConfig() {
return {
tags: ['P', 'SPAN'],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm realizing now that this filter is probably the reason why we only got span-related events in onPaste(). I wonder if there is some sort of wildcard that we could use, but for now, this is good enough because I believe it will solve the bug!

@richardolsson richardolsson merged commit b7cb48e into main Jan 24, 2025
6 checks passed
@richardolsson richardolsson deleted the issue-2394/paste-into-email-editor branch January 24, 2025 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Copy-paste (from Word) to email composer generates "undefined"
2 participants